package com.xjzd.std.exception;

public class ExceptionInFinallyBlock {

    public static void close() {
        throw new RuntimeException("exception in finally block");
    }

    public static void main(String[] args) {
        try {
            System.out.println("try block");
        } finally {
            System.out.println("finally");
            close();
        }

        // 这句由于finally块中抛出了异常而并不会执行
        System.out.println("main");
    }
}
